// mapmanager.h
#ifndef MAPMANAGER_H
#define MAPMANAGER_H

#include <QObject>
#include <QString>
#include "mapdata.h"

class MapManager : public QObject {
    Q_OBJECT

public:
    explicit MapManager(QObject *parent = nullptr);

    bool loadMapFromFile(const QString &filePath, MapData &outMap);
    bool validateMap(const MapData &map);
    bool saveMapToFile(const QString &filePath, const MapData &map);

    char getElementChar(MapElement element);
    MapElement getCharElement(char c);

private:
    bool parseMapContent(const QString &content, MapData &outMap);
};

#endif // MAPMANAGER_H
